#include "StdAfx.h"
#include "../sgp/Rect.h"
#include "../sgp/VideoSurfaceLock.h"
#include "..\sgp\ImageDataRGB.h"

namespace ja2{ namespace sgp
{
	ImageDataRGB::ImageDataRGB(DataType_t &&pData, std::uint_least32_t Size)
		: m_pData(std::move(pData)), m_Size(Size)
	{
	}

	void ImageDataRGB::blit_transparent(IDirectDrawSurfacePtr &pSurface, Rect const &SourceRect) const
	{
		VideoSurfaceLock lock(pSurface);
		for(std::uint_least16_t i = 0; i < SourceRect.height(); ++i)
			do_blit(static_cast<char *>(lock.buffer()) + lock.pitch() * i, m_pData.get(), SourceRect.width(), i);
	}

	void ImageDataRGB::blit_shadow(IDirectDrawSurfacePtr &/*pSurface*/, Rect const &/*SourceRect*/) const
	{
		JA2_ASSERT_MESAGE(false, "Not implemented");
	}

	PaletteVector_t const *ImageDataRGB::palette() const
	{
		return nullptr;
	}
} /*sgp*/} /*ja2*/